#include <iostream>
#include <string>
using namespace std;

int main(int argc, const char *argv[]){
    string s1;
    s1 = "hello";
    string s2 = "beijing";
    string s3("xja");
    string s4(5, 'x');

    string s5 = "china";
    string s6 = s5;  // 相当于strcpy
    string s7 = "good";
    string s8 = s5 + s7; // 相当于strcat

    cout << s1 << endl; // hello
    cout << s2 << endl; // beijing
    cout << s3 << endl; // xja
    cout << s4 << endl; // xxxxx
    cout << s5 << endl; // china
    cout << s6 << endl; // china
    cout << s7 << endl; // good
    cout << s8 << endl; // chinagood
    s8 = s5 + " " + s7;
    cout << s8 << endl; // china good

    return 0;
}